package com.yonyou.pmclouds.project.processor;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.project.entity.ProjectVO;
import com.yonyou.pmclouds.team.rmiimpl.TeamMaintainForProject;

public class DeleteUpdateTeamProcessor implements SingleProcessor<ProjectVO> {
    private TeamMaintainForProject teamMemberMaintain;

    public DeleteUpdateTeamProcessor(TeamMaintainForProject teamMemberMaintain) {
        this.teamMemberMaintain = teamMemberMaintain;
    }

    // 同步项目团队的项目状态
    @Override
    public void process(ProjectVO vo, ProjectVO orig) throws BusinessException {
        teamMemberMaintain.deleteTeamByProject(vo.getPkProject());
    }
}
